<?php
// Make a MySQL Connection
mysql_connect("localhost", "admin", "") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

// Retrieve all the data from the "example" table
$result = mysql_query("SELECT * FROM example")
or die(mysql_error());  


// store the record of the "example" table into $row
$row = mysql_fetch_array( $result );
// Print out the contents of the entry 

echo $result;
echo "Name: ".$row['name'];
echo " Age: ".$row['age'];

$row = mysql_fetch_array( $result );

echo $result;
echo "Name: ".$row['name'];
echo " Age: ".$row['age'];


?>